package szoftlab4sunak;

import java.awt.Color;
import java.awt.Graphics;
import java.security.acl.Owner;

public class VDwarf implements VEnemy {
	
	private Color color;		//Hozza tartozo szin
	private Dwarf dwarf;		//Dwarf tipusu ellenseg tarolasa
	
	//Konstruktor
	public VDwarf(){
		//Szin beallitasa
		this.color = new Color(153, 51, 255);
	}
	
	@Override
	//Kirajzolas
	public void draw(Graphics g) {
		
		g.setColor(this.color);
		//Poziciok lekerdezese a tarolt objektumtol
        int x1 = dwarf.getPosx()+50;
        int y1 = dwarf.getPosy()+50;
        int r1 = 50;
        
        //Kor kirajzolasa
        x1 = x1 - (r1/2);
        y1 = y1 - (r1/2);
        g.fillOval(x1,y1,r1,r1);
		
	}

	@Override
	public boolean positionChanged() {
	
		return false;
	}

	//A hozza tartozo objektum beallitasa
	public void setEnemy(Dwarf d) {
		this.dwarf = d;		
	}
	
	// megnezi hogy a 0. cellan allnak-e
	@Override
	public boolean isDrawable() {
		if(dwarf.currentCell.getID() == 0)
			return false;
		else return true;
	}

}
